package ji_university;

/**
 * @author 1.自动拥有/继承了父类的4个属性（成员变量）
 * 2.重写了父类的enter()方法
 */
public class Vip_university extends University {
double si=sum+sport;
Vip_university(){}
Vip_university(double math,double english,double chinese,double sport)
{
    this.sport=sport;
    this.english=english;
    this.chinese=chinese;
    this.math=math;
}

@Override
    void enter()
{
    if(si>=290)
    {
        System.out.println("恭喜！4门课总分为："+si+"达到重点大学录取线");
    }
    else
    {
        System.out.println("您未被重点大学录取！");
    }

}

}
